# vim:ts=4:sw=4:noet:
""" Optimiser Core """

from opt.bbopt import OptTrim
from opt.iropt import OptInline

class Optimiser:
	def __init__(self, compiler, mem, classes):
		self.mem = mem
		self.compiler = compiler
		self.classes = classes
		self.opttrim = OptTrim()
		self.optinline = OptInline(self.compiler, self.mem, self.classes)

	def doIROpts(self, cls, meth):
		self.optinline.doMethod(cls, meth)

	def doBBOpts(self, cls, meth):
		self.opttrim.doMethod(meth)
